const bcrypt = require('bcryptjs')
const { sequelize } = require('../../../core/db');
const { Sequelize,Model } = require('sequelize');
const { NotFound,AuthFailed } = require('../../../core/httpException');

// 商品表
class Theme extends Model{

}

Theme.init({
    id:{
        type:Sequelize.INTEGER,
        primaryKey:true,
        autoIncrement:true
    },
    name:{
        type:Sequelize.TEXT
    },
    cover:Sequelize.TEXT,
    
},{
    sequelize,
    tableName:'theme'
})

// Goods.sync({alter:true})



class ThemeGoodList extends Model {

}
ThemeGoodList.init({
    id:{
        type:Sequelize.INTEGER,
        primaryKey:true,
        autoIncrement:true
    },
    good_id:{
        type:Sequelize.INTEGER
    },
    theme_id:Sequelize.INTEGER,
    
},{
    sequelize,
    tableName:'theme_good_list'
})



module.exports = { Theme,ThemeGoodList }